'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  // router.get('/', controller.home.index);

  router.redirect('/', '/index.html', 302);

  router.get('菜单', '/menu', app.controller.home.menu);
  router.get('读取远程', '/main/readurl', app.controller.home.readUrl);
  router.post('文件上传', '/demo/upload', app.controller.home.upload);

  router.get('列表', '/demo/list', app.controller.demo.list);
  router.post('增改', '/demo/createorupdate', app.controller.demo.createOrUpdate);
  router.post('删除', '/demo/delete', app.controller.demo.destroy);
};
